﻿using System.Data;

namespace Tms.BLL
{
    public partial class plan
    {
        private readonly DAL.plan dal = new DAL.plan();
           
        //是否存在
        public bool Exists(int id)
        {
            return dal.Exists(id);
        }
        public bool Exists(string planNo)
        {
            return dal.Exists(planNo);
        }

        //增加一条数据
        public int Add(Model.plan model)
        {
            return dal.Add(model);
        }

        //更新一条数据
        public bool Update(Model.plan model)
        {
            return dal.Update(model);
        }

        //删除一条数据
        public bool Delete(int id)
        {
            return dal.Delete(id);
        }

        //获取一个实体对象
        public Model.plan GetModel(int id)
        {
            return dal.GetModel(id);
        }

        //获取前几行数据
        public DataSet GetList(int Top, string strWhere, string strOrder)
        {
            return dal.GetList(Top, strWhere, strOrder);
        }

        //获取查询分页数据
        public DataSet GetList(int pageSize, int pageIndex, string strWhere, string strOrder, out int recordCount)
        {
            return dal.GetList(pageSize, pageIndex, strWhere, strOrder, out recordCount);
        }

        //获取最大编号
        public string GetMaxPlanNo()
        {
            return dal.GetMaxPlanNo();
        }


    }
}